#ifndef _ODN_TIMER_H
#define _ODN_TIMER_H

//Engine headers 
#include "odn_Element.h"

namespace ouden
{
	
	class ODN_TimeManager //: public ODN_Element
	{
	    
	public:
		
		ODN_TimeManager();
		~ODN_TimeManager()		{}   
	
		//Variable access functions 
	    int getFPS()				{ return fps; }
	    long getElapsed()			{ return elapsed; }
	    void setElapsed(long Elapsed)		{ elapsed = Elapsed; }
	    long getElapsedSqrd()		{ return elapsed2; }
	    long getTime()				{ return timer; }
	
	    void Update();
	    
	private:
	
		int 	fps;			//FPS of the engine
	    long 	elapsed;		//Time elapsed since last frame
	    long 	elapsed2;		//Elapsed squared
	    long 	timer;			//Current time
	    //long 	elapsedold;
	    //float 	elapsedchange;	//Current elapsed value divided by the previous elapsed value for time corrected Verlet integration     
	
	    long 	FPSCounter;		//Holds the current FPS count
	    long 	FrameTimer;		//Holds the time of the last FPS update
	    
	};
	
}

#endif //_ODN_Timer_H
